// BWWrapList.h -- interface to a wrap list, 1-D lit that is wrapped into
//                 a 2-D presentation.

#import <Cocoa/Cocoa.h>

@interface BWWrapList : NSView
{
    // value binding
    id valueBinding;
    NSString *valueKeyPath;

    // selection binding
    id selectionBinding;
    NSString *selectionKeyPath;

    IBOutlet id delegate;

    int cellWidth, cellHeight;
    int padWidth, padHeight;
    
    // display stuff
    int cellsPerRow, rows;
}

- (void) setCellWidth: (int) width  height: (int) height;
- (void) setPadWidth: (int) width  height: (int) height;

@end // BWWrapList


@interface NSObject (BWWrapListDataSource)

- (int) numberOfRowsInWrapList: (BWWrapList *) wrapList;
- (id) wrapList: (BWWrapList *) list  objectForRow: (int) row;

@end // BWWrapListDataSource


@interface NSObject (BWWrapListDelegate)

- (void) wrapList: (BWWrapList *) wrapList   selectionChanged: (int) index;

@end // BWWrapListDelegate


